<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>3 link+visited+hover+active</title>
  <style>
    .link:link {
      color: black;
      font-size: 2em;
    }

    .link:visited {
      color: purple;
    }

    .link:hover {
      color: green;
    }

    .link:active {
      color: red;
    }
  </style>
</head>

<body>
  <a href='javascript:;' class='link'>链接</a>
</body>

</html>